package com.zeei.bfs.vo;

import java.util.Date;

import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;

import com.zeei.common.vo.TreeNodeVO;

/**
 * 类描述：部门信息表T_DIC_DEPTINFO对应的实体类
 *
 * @author zws
 * @version 1.0
 * @date 2016年7月6日
 * 
 */
public class DeptinfoVO extends TreeNodeVO<DeptinfoVO> {
	/** 部门ID */
	private Integer deptId;
	/** 部门名称 */
	private String deptName;
	/** 部门职能描述 */
	private String deptDesc;
	/** 部门负责人ID */
	private Integer deptLeaderId;
	/** 创建人ID */
	private Integer createId;
	/** 创建时间 */
	private Date createTime;
	/** 父级部门id */
	private Integer pdeptId;
	/** 父级部门id */
	private String _parentId;
	////////////////////////////////////////////////////////////////////////////////////
	/** 部门负责人名称 */
	private String deptLeaderName;
	/** 管理员角色id */
	private Integer roleId;

	private boolean searchNode;
	
	public boolean isSearchNode() {
		return searchNode;
	}

	public void setSearchNode(boolean searchNode) {
		this.searchNode = searchNode;
	}

	public Integer getDeptId() {
		return deptId;
	}

	public void setDeptId(Integer deptId) {
		this.deptId = deptId;
		if (deptId != null) {
			this.id = StringUtils.trim(deptId.toString());
		}
	}

	public String getDeptName() {
		return deptName;
	}

	public void setDeptName(String deptName) {
		this.deptName = StringUtils.trim(deptName);
		this.text = StringUtils.trim(deptName);
	}

	public String getDeptDesc() {
		return deptDesc;
	}

	public void setDeptDesc(String deptDesc) {
		this.deptDesc = deptDesc;
	}

	public Integer getDeptLeaderId() {
		return deptLeaderId;
	}

	public void setDeptLeaderId(Integer deptLeaderId) {
		this.deptLeaderId = deptLeaderId;
	}

	public Integer getCreateId() {
		return createId;
	}

	public void setCreateId(Integer createId) {
		this.createId = createId;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getDeptLeaderName() {
		return deptLeaderName;
	}

	public void setDeptLeaderName(String deptLeaderName) {
		this.deptLeaderName = deptLeaderName;
	}

	public Integer getPdeptId() {
		return pdeptId;
	}

	public void setPdeptId(Integer pdeptId) {
		this.pdeptId = pdeptId;
		if (pdeptId != null) {
			this.parentId = StringUtils.trim(pdeptId.toString());
			this.set_parentId(StringUtils.trim(pdeptId.toString()));
		}
	}

	public Integer getRoleId() {
		return roleId;
	}

	public void setRoleId(Integer roleId) {
		this.roleId = roleId;
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}

	public String get_parentId() {
		return _parentId;
	}

	public void set_parentId(String _parentId) {
		this._parentId = _parentId;
	}

}
